﻿@model SMECustomerWebsite.Models.ViewModels.SaleCode.EditDaoRequestViewModel

@using Common.Data.Repository.Enum;
@using Common.Data;

@using (Html.BeginForm("AddEditDaoRequestByInput", "SaleCode", FormMethod.Post, new { enctype = "multipart/form-data", @class = "form-horizontal form-label-left", novalidate = "novalidate" }))
{
    List<SelectListItem> listPostion = new List<SelectListItem>();
    listPostion.Add(new SelectListItem
    {
        Text = "--- Chọn lý do ---",
        Value = "",
        Selected = true
    });
    var listEnum = Enum.GetValues(typeof(SMESalePositionEnum)).Cast<SMESalePositionEnum>().ToList();
    listEnum.ForEach(x =>
    {
        listPostion.Add(new SelectListItem
        {
            Text = EnumHelper<SMESalePositionEnum>.GetDisplayValue(x),
            Value = x.ToString(),
            Selected = false
        });
    });
    <h1>LỰA CHỌN DAO ĐỂ SỬA THÔNG TIN</h1>
    <div class="item form-group">
        <label class="col-md-12">DAO * :</label>
        @Html.DropDownListFor(m => m.Dao, new List<SelectListItem>(), new { @class = "form-control branch_register", placeholder = "Nhập Dao", @id = "daoSale", required = "required" })
    </div>
    <panel id="info_panel" style="display:none;">
        <div class="item form-group">
            <label class="col-md-12">@SMECustomerWebsite.Core.Resources.Resource.Fullname * :</label>
            @Html.TextBoxFor(m => m.DaoName, new { @class = "form-control", placeholder = "Full name", required = "required", @id = "dao_name" })
        </div>
        <div class="item form-group">
            <label class="col-md-12">Branch * :</label>
            @Html.DropDownListFor(m => m.Branch, new List<SelectListItem>(), new { @class = "form-control", @id = "branch_register", placeholder = "Chi nhánh", required = "required" })
        </div>
        <div data-toggle="tooltip" data-placement="right" title="" data-original-title="" class="item form-group">
            <label class="col-md-12">@SMECustomerWebsite.Core.Resources.Resource.Position * :</label>
            @Html.DropDownListFor(m => m.DeliveryPoint, listPostion, new { @class = "form-control", @id = "position_name", placeholder = "Chức danh", required = "required" })
        </div>
        <div class="item form-group">
            <label class="col-md-12">@SMECustomerWebsite.Core.Resources.Resource.StaffIdHeader * :</label>
            @Html.TextBoxFor(m => m.IdMis, new { @class = "form-control", placeholder = "Staff Id", required = "required", @id = "id_mis" })
        </div>
        <div class="item form-group">
            <label class="col-md-12">CIF * :</label>
            @Html.TextBoxFor(m => m.Cif, new { @class = "form-control", placeholder = "Mã CIF", required = "required", @id = "cif" })
        </div>
        <div data-toggle="tooltip" data-placement="right" title="" data-original-title="Ảnh chụp thư mời làm việc, chỉ chấp nhận file ảnh hoặc pdf" class="item form-group">
            <label class="col-md-12">Offer Letter * :</label>
            @Html.TextBoxFor(m => m.File, new { @class = "form-control", type = "file", placeholder = "Thư mời làm việc", required = "required" })
        </div>
    </panel>

    <div>
        <input type="submit" class="btn btn-success submit" value="Submit" />
    </div>
}